package com.ean.backpack.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ean.backpack.domain.Gdspropertyattributelink;
import com.ean.backpack.domain.GdspropertyattributelinkPK;
import com.ean.backpack.repository.GdspropertyattributelinkRepository;
import com.ean.backpack.service.GdspropertyattributelinkService;

@Service
@Transactional
public class GdspropertyattributelinkServiceImpl implements
		GdspropertyattributelinkService {

	@Autowired
	GdspropertyattributelinkRepository gdspropertyattributelinkRepository;

	public long countAllGdspropertyattributelinks() {
		return gdspropertyattributelinkRepository.count();
	}

	public void deleteGdspropertyattributelink(
			Gdspropertyattributelink gdspropertyattributelink) {
		gdspropertyattributelinkRepository.delete(gdspropertyattributelink);
	}

	public Gdspropertyattributelink findGdspropertyattributelink(
			GdspropertyattributelinkPK id) {
		return gdspropertyattributelinkRepository.findOne(id);
	}

	public List<Gdspropertyattributelink> findAllGdspropertyattributelinks() {
		return gdspropertyattributelinkRepository.findAll();
	}

	public List<Gdspropertyattributelink> findGdspropertyattributelinkEntries(
			int firstResult, int maxResults) {
		return gdspropertyattributelinkRepository.findAll(
				new org.springframework.data.domain.PageRequest(firstResult
						/ maxResults, maxResults)).getContent();
	}

	public void saveGdspropertyattributelink(
			Gdspropertyattributelink gdspropertyattributelink) {
		gdspropertyattributelinkRepository.save(gdspropertyattributelink);
	}

	public Gdspropertyattributelink updateGdspropertyattributelink(
			Gdspropertyattributelink gdspropertyattributelink) {
		return gdspropertyattributelinkRepository
				.save(gdspropertyattributelink);
	}
}
